package com.snj.test2508;

public class DateFormatter {
    public static void main(String[] args) {
        String startDateStr = "2025-02-30";
        String endDateStr = "2025-02-02";

        String result = formatDateRange(startDateStr, endDateStr);
        System.out.println(result);  // 输出: 06-09
    }

    public static String formatDateRange(String startDateStr, String endDateStr) {
        // 提取日期部分（最后两位）
        String startDay = startDateStr.substring(startDateStr.length() - 2);
        String endDay = endDateStr.substring(endDateStr.length() - 2);

        return startDay + "-" + endDay;
    }
}